<template>
			<!--总容器-->
			<div class="wrapper">
				
				<!--header-->
				<header>
					<div class="back"><p onclick="location.href='index.html'">&lt;</p></div>
					<p>商家列表</p>
					</header>
				
				<!--body-->
				<ul class="business">
					<li v-for="item in businessArr">
						<div class="bsns-img">
							<img v-bind:src="item.businessImg">
							<div class="bsns-img-quantify">3</div>
						</div>
						<div class="bsns-info">
							<h3>{{item.businessName}}</h3>
							<p>&#165;{{item.starPrice}}起送 | &#165;{{item.deliveryPrice}}配送</p>
							<p>{{item.businessExplain}}</p>
						</div>
					</li>
					
				</ul>
				
				<Footer></Footer>
				
			</div>

	
</template>

<script>
	import Footer from "@/components/Footer.vue";
	
	export default{
		name:'BusinessListe',
		data(){
			return{
				orderTypeId: this.$router.query.orderTypeId,
				businessArr:[]
			}
		},
		created(){
			this.$axios.post('BusinessController/listBusinessByOrderTypeId',this.$qs.stringify({
				orderTypeId:this.orderTypeId
			})).then(response=>{
				this.businessArr = response.data;
			}).catch(error=>{
				console.error(error);
			});
		},
		components:{
			Footer
		}
	}
</script>

<style scoped>
	/****************总容器*********************/
	
	.wrapper{
		width: 100%;
		height: 100%;
		
	}
	
	/****************header*********************/
	.wrapper header{
		width: 100%;
		height: 12vw;
		background-color: #0097FF;
		color: #FFFFFF;
		font-size: 4.8vw;
		
		position: fixed;
		left: 0;
		top: 0;
		z-index: 1000;
		
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.wrapper header .back{
		position: absolute;
		width: 2vw;
		height: 2vw;
		left: 1.5vw;
		top: 2.8vw;
		user-select:none;
		cursor: pointer;
	}
	
	/***************business****************/
	.wrapper .business{
		display:inline-block;
		width: 100%;
		margin-top: 12vw;
		margin-bottom: 14vw;
	}
	.wrapper .business li{
		width: 100%;
		box-sizing: border-box;
		padding: 2.5vw;
		border-bottom: solid 1px #DDDDDD;
		user-select:none;
		cursor: pointer;
		
		display: flex;
		align-items: center;
	}
	.wrapper .business li .bsns-img{
		position: relative;
	}
	.wrapper .business li .bsns-img img{
		width: 20vw;
		height: 20vw;
	}
	.wrapper .business li .bsns-img .bsns-img-quantify{
		width: 5vw;
		height: 5vw;
		background-color: red;
		color: #FFFFFF;
		font-size: 3.6vw;
		border-radius: 2.5vw;
		display: flex;
		justify-content: center;
		align-items: center;
		
		position: absolute;
		right: -1.5vw;
		top: -1.5vw;
	}
	.wrapper .business li .bsns-info{
		margin-left: 3vw;
	}
	.wrapper .business li .bsns-info h3{
		font-size: 3.8vw;
		color: #555555;
	}
	.wrapper .business li .bsns-info p{
		font-size: 3vw;
		color: #888888;
		margin-top: 2vw;
	}
	

</style>
